export default function (Vue) {
  Vue.mixin({
    beforeCreate() {
      const options = this.$options
      if (options.store) {
        this.$store = options.store
      } else {
        this.$store = options.parent?.$store
      }
    }
  })
}